<template>
  <div id="app">
    <keep-alive :include="/.+keepAlive$/">
      <router-view></router-view>
    </keep-alive>
  </div>
</template>

<script>
export default {
  name: "app",
  watch: {
    $route: {
      handler(nv) {
        console.log(nv.fullPath, nv.meta);
      },
    },
  },
  mounted() {
    // eruda.init()
    /*document.body.addEventListener('touchmove', function (e) {
        e.preventDefault() // 阻止默认的处理方式(阻止下拉滑动的效果)
      }, {passive: false}) // passive 参数不能省略，用来兼容ios和android*/
  },
};
</script>

<style lang="less" type="text/less">
@import "~vux/src/styles/reset.less";
@import "~vux/src/styles/1px.less";

html {
  font-size: 50px;
  height: 100%;
}

body {
  background-color: #e5eefe;
  font-size: 0.28rem;
  height: 100%;
}

#app {
  height: 100%;
}
.clear {
  zoom: 1;
  overflow: hidden;
}

.clear:after {
  content: "";
  display: block;
  clear: both;
}

.fl {
  float: left;
}

.fr {
  float: right;
}

.wap {
  .display-flex;
  .flex-direction-column;
  height: 100%;
}
.main {
  .flex-1;
  overflow-y: scroll;
  /*overflow: auto;
    touch-action: pan-y;
    -webkit-overflow-scrolling: touch;*/
  -webkit-overflow-scrolling: touch;
  position: relative;
  ._v-container {
    min-height: calc(100% + 1px);
  }
}
.overflow {
  overflow: hidden;
}

.vux-1px-b:after {
  border-bottom: 2px solid #ebebeb;
  height: 2px;
}

/**超出一行省略号*/
.beyond-one {
  overflow: hidden;
  text-overflow: ellipsis;
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 1;
}

.beyond-two {
  overflow: hidden;
  text-overflow: ellipsis;
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

/*弹性布局基本*/
.display-flex {
  display: -webkit-box;
  display: -ms-flexbox;
  display: -webkit-flex;
  display: flex;
}

.flex-1 {
  -webkit-box-flex: 1;
  -ms-flex: 1;
  -webkit-flex: 1;
  flex: 1;
}

.flex-direction-column {
  -webkit-box-orient: vertical;
  -ms-flex-direction: column;
  -webkit-flex-direction: column;
  flex-direction: column;
}

.flex-direction-row {
  -webkit-box-orient: horizontal;
  -ms-flex-direction: row;
  -webkit-flex-direction: row;
  flex-direction: row;
}

/*主轴对齐*/
.justify-content-flex-center {
  -webkit-box-pack: center;
  -ms-flex-pack: center;
  -webkit-justify-content: center;
  justify-content: center;
}

.justify-content-flex-end {
  -webkit-box-pack: end;
  -ms-flex-pack: end;
  -webkit-justify-content: flex-end;
  justify-content: flex-end;
}

.justify-content-flex-justify {
  -webkit-box-pack: justify;
  -ms-flex-pack: justify;
  -webkit-justify-content: space-between;
  justify-content: space-between;
}

.flex-wrap-wrap {
  -webkit-box-pack: justify;
  -webkit-flex-wrap: wrap;
  -ms-flex-wrap: wrap;
  flex-wrap: wrap;
}

/*侧轴对齐*/
.align-items-flex-start {
  -webkit-box-align: start;
  -ms-flex-align: start;
  -webkit-align-items: flex-start;
  align-items: flex-start;
}

.align-items-flex-end {
  -webkit-box-align: end;
  -ms-flex-align: end;
  -webkit-align-items: flex-end;
  align-items: flex-end;
}

.align-items-center {
  -webkit-box-align: center;
  -ms-flex-align: center;
  -webkit-align-items: center;
  align-items: center;
}

.align-items-baseline {
  -webkit-box-align: baseline;
  -ms-flex-align: baseline;
  -webkit-align-items: baseline;
  align-items: baseline;
}

/**vux 公用样式修改*/
.vux-header {
  background-color: #527dd9 !important;
  .vux-header-title {
    .display-flex;
    .align-items-center;
    .justify-content-flex-center;
    font-size: 0.36rem !important;
    font-weight: 500 !important;
    line-height: inherit !important;
  }
  .vux-header-right {
    line-height: normal !important;
  }
  .left-arrow:before {
    border: 1px solid #fff !important;
    border-width: 1px 0px 0px 1px !important;
  }
  &.whiteTheme {
    background: #ffffff !important;
    .vux-header-title {
      color: #333;
    }
    .left-arrow:before {
      border: 1px solid #333333 !important;
      border-width: 1px 0px 0px 1px !important;
    }
  }
}
.loading-layer {
  margin-top: 0.2rem !important;
  margin-bottom: 0.2rem !important;
  line-height: normal !important;
}
.pull-to-refresh-layer {
  .text {
    font-size: 0.28rem !important;
    line-height: inherit !important;
  }
}

.vux-timeline-item-content {
  padding: 0 0 0.8rem 0.6rem !important;
}

.vux-popover-arrow-up {
  left: 80%;
}

.commonWhiteBg {
  position: fixed;
  left: 0;
  top: 0;
  right: 0;
  bottom: 0;
  background: #ffffff;
  z-index: -1;
}

.vux-prompt-msgbox {
  height: 0.6rem;
  text-align: left;
  padding-left: 0.2rem;
}
.weui-dialog__title {
  margin-bottom: 0.2rem;
  font-weight: bold;
}
.weui-dialog__hd {
  padding: 1.3em 1.6em;
  text-align: left;
}
.dp-container {
  .dp-header {
    display: flex;
    flex-direction: row;
    align-items: center;
    .dp-item {
      line-height: normal;
      padding-top: 0.2rem;
    }
  }
  .dp-content {
    .dp-item {
      .scroller-content {
        .scroller-item {
          display: flex;
          flex-direction: row;
          align-items: center;
          justify-items: center;
          margin-left: 0.5rem;
          line-height: normal;
        }
      }
    }
  }
}
.weui-dialog {
  top: 30% !important;
  //transform: translate(0%,-50%) !important;
  bottom: auto !important;
  margin: 0 auto !important;
  .weui-dialog__ft {
    height: 0.96rem;
    line-height: normal;
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-items: center;
    a {
      .display-flex;
      margin: 0 0.2rem;
      .flex-1;
      background: #527dd9;
      color: #fff;
      .justify-content-flex-center;
      .align-items-center;
      height: 0.8rem;
      border-radius: 0.4rem;
      margin-bottom: 0.4rem;
      font-size: 0.34rem;
    }
    .weui-dialog__btn_default {
      color: #999 !important;
      background: #fff !important;
      border: 1px solid #ddd;
    }
    .weui-dialog__btn:after {
      border: none;
    }
    &:after {
      border: none;
    }
  }
}

.add-reduce-dialog {
  .weui-dialog__btn_default {
    background: #fff !important;
    color: #000 !important;
    border: 1px solid #ddd !important;
  }
}
.weui-cell {
  padding: 0 0.15rem;
}
.normal-input {
  background: none;
  outline: none;
  border: 0px;
  height: 0.6rem;
  outline-color: invert;
  outline-style: none;
  outline-width: 0px;
  border: none;
  text-shadow: none;
  -webkit-appearance: none;
  -webkit-user-select: text;
  outline-color: transparent;
  box-shadow: none;
  font-size: 0.32rem;
}
.weui-tabbar__item.weui-bar__item_on .weui-tabbar__label {
  color: #333333 !important;
}
.vux-input-icon {
  display: none;
}

.weui-toast__content {
  width: 3.8rem;
}
._v-container {
  -webkit-overflow-scrolling: touch !important;
}
._v-content {
  -webkit-overflow-scrolling: touch !important;
}
.selectGoodsBox {
  .vux-button-group > a.vux-button-group-current {
    background-color: #fb6e52 !important;
  }
  .vux-button-group > a.vux-button-tab-item:after {
    border: 1px solid #fb6e52 !important;
  }
}
.dataAnalysisBody,
.purchaseBox {
  .vux-button-group > a.vux-button-group-current {
    background-color: #527dd9 !important;
    color: #ffffff !important;
  }
  .vux-button-group > a.vux-button-tab-item:after {
    border: 1px solid #527dd9 !important;
  }
  .vux-button-group > a.vux-button-tab-item {
    color: #527dd9;
  }
}

.vux-x-dialog-absolute .weui-dialog {
  position: fixed;
}
.customerTab {
  .vux-button-tab-item {
    line-height: normal;
    height: 15px;
    padding: 6px 0 8px;
  }
}
.dataAnalysisBody,
.purchaseBox {
  .vux-button-tab-item {
    line-height: normal;
    height: 18px;
    padding: 7px 0 9px;
  }
  .vux-button-group > a.vux-button-tab-item-first {
    border-top-left-radius: 6px;
    border-bottom-left-radius: 6px;
  }
  .vux-button-group > a.vux-button-tab-item-first:after {
    border-top-left-radius: 9px;
    border-bottom-left-radius: 9px;
  }
  .vux-button-group > a.vux-button-tab-item-last {
    border-top-right-radius: 6px;
    border-bottom-right-radius: 6px;
  }
  .vux-button-group > a.vux-button-tab-item-last:after {
    border-top-right-radius: 9px;
    border-bottom-right-radius: 9px;
  }
}
.vux-popover {
  left: 6rem !important;
  width: 1.5rem !important;
  p {
    padding: 0.1rem 0;
  }
}
</style>
